package com.knowledge.review.designPatterns.behavioralpattern.chainofresponsibilitypattern.demo2;

public class Test {
    public static void main(String[] args) {
        Manager manager = new Manager("金利");
        Manager director = new Manager("宗剑");
        Manager generalManager = new Manager("钟精励");
        Request request = new Request();
        request.setRequestType("加薪");
        request.setRequestContent("Shier请求加薪");
        request.setNumber(10000); 
        // 不同身份的人有不同的权限，进行处理结果
        manager.getResult("经理", request);
        director.getResult("总监", request);
        generalManager.getResult("总经理", request);
        Request request2 = new Request();
        request2.setRequestType("请假");
        request2.setRequestContent("Shier请假");
        request2.setNumber(3); // 权限级别
        manager.getResult("经理", request2);
        director.getResult("总监", request2);
        generalManager.getResult("总经理", request2);
    }
}